const routes = [{
  path: '',
  component: () => import('@/pages/home'),
  children: [
    {
      path: '',
      name: '工程管理',
      component: () => import('@/pages/index'),
    },
    {
      path: '/detail/:id',
      name: '工程详情',
      meta: {
        preName: '工程管理',
        prePath: '/'
      },
      component: () => import('@/pages/detail'),
    },
    
    {
      path: '/materialDepot',
      name: '材料库管理',
      component: () => import('@/pages/materialDepot/index')
    },
    {
      path: '/materialDepot/detail/:id',
      name: '材料库详情',
      meta: {
        preName: '材料库管理',
        prePath: '/materialDepot'
      },
      component: () => import('@/pages/materialDepot/detail')
    },
    /* {
      path: '/materialDepot/list/:id',
      component: () => import('@/pages/materialDepot/materialList')
    }, */
    {
      path: '/template',
      name: '模板管理',
      component: () => import('@/pages/template')
    },
    {
      path: '/template/detail/:templateId/:templateSpaceId',
      name: '模板详情',
      meta: {
        preName: '模板管理',
        prePath: '/template'
      },
      component: () => import('@/pages/template/detail')
    }
  ]
},
  {
    path: '/login',
    component: () => import('@/pages/login')
  }
]

export default routes
